

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/notebook.ico">
  <link rel="icon" href="/img/notebook.ico">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="">
  <meta name="author" content="John Doe">
  <meta name="keywords" content="">
  
  <title>Jvm 配置及优化 - xulinglin</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10.7.2/styles/monokai-sublime.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
  



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->

  
<link rel="stylesheet" href="/css/diy/shubiao.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/bynotes/texiao/source/css/toubudaziji.css">



  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.8.11","typing":{"enable":true,"typeSpeed":70,"cursorChar":"","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null}},"search_path":"/local-search.xml"};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
  <header style="height: 30vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>笑语</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                目录
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('/img/img_1.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.5)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="Jvm 配置及优化">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2021-06-04 12:46" pubdate>
        2021年6月4日 下午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      1.3k 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      18
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">Jvm 配置及优化</h1>
            
            <div class="markdown-body">
              <p>Java 虚拟机有自己完善的硬件架构, 如处理器、堆栈、寄存器等，还具有相应的指令系统。JVM 屏蔽了与具体操作系统平台相关的信息，使得 Java 程序只需生成在 Java 虚拟机上运行的目标代码 (字节码), 就可以在多种平台上不加修改地运行。<br>JVM是JAVA世界的核心，了解它有助于我们更好调试，调优和开发程序。</p>
<h2 id="1-命令"><a href="#1-命令" class="headerlink" title="1. 命令"></a>1. 命令</h2><h3 id="1-1-查看-java-pid项目"><a href="#1-1-查看-java-pid项目" class="headerlink" title="1.1. 查看 java pid项目"></a>1.1. 查看 java pid项目</h3><div class="hljs code-wrapper"><pre><code class="hljs Java">jps</code></pre></div>

<h3 id="1-2-收集内存使用基本情况统计"><a href="#1-2-收集内存使用基本情况统计" class="headerlink" title="1.2. 收集内存使用基本情况统计"></a>1.2. 收集内存使用基本情况统计</h3><div class="hljs code-wrapper"><pre><code class="hljs Java">jmap -heap [pid] &gt; [路径]</code></pre></div>

<p class="note note-info">
如：jmap -heap 16155 > /opt/jmapheap jmapheap 是文件名称
</p>

<h3 id="1-3-查看GC使用情况"><a href="#1-3-查看GC使用情况" class="headerlink" title="1.3. 查看GC使用情况"></a>1.3. 查看GC使用情况</h3><div class="hljs code-wrapper"><pre><code class="hljs Java">jstat -gcutil [pid] [毫秒]</code></pre></div>
<p class="note note-info">
如：jstat -gcutil 16155 1000
</p>

<h3 id="1-4-获取dump文件"><a href="#1-4-获取dump文件" class="headerlink" title="1.4. 获取dump文件"></a>1.4. 获取dump文件</h3><div class="hljs code-wrapper"><pre><code class="hljs Java">jmap -dump:file=[文件名称] [pid]</code></pre></div>

<p class="note note-info">
如：jmap -dump:file=test.dump 16155, jmap在获取dump文件时候会停止应用注意,也可以hprof结尾
</p>

<h2 id="2-常用配置"><a href="#2-常用配置" class="headerlink" title="2. 常用配置"></a>2. 常用配置</h2><h3 id="2-1-jvm-参数配置"><a href="#2-1-jvm-参数配置" class="headerlink" title="2.1. jvm 参数配置"></a>2.1. jvm 参数配置</h3><div class="hljs code-wrapper"><pre><code class="hljs Python">-Xms1024m 
-Xmx1024m 
-Xmn512m 
-Xss256k 
-XX:NewRatio=<span class="hljs-number">4</span> 
-XX:SurvivorRatio=<span class="hljs-number">4</span> 
-XX:MetaspaceSize=256m 
-XX:MaxMetaspaceSize=256m 
-XX:TargetSurvivorRatio=<span class="hljs-number">90</span>
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=$DIR 
-XX:MaxTenuringThreshold=<span class="hljs-number">15</span> 
-XX:+UseConcMarkSweepGC 
-server</code></pre></div>
<ul>
    <li><span class="label label-primary">-Xmx</span> 设置最大堆大小</li>
    <li><span class="label label-primary">-Xms</span> 设置最小堆大小,最小堆跟最大堆,最好保持一致以免 动荡的 java 堆</li>
    <li><span class="label label-primary">-Xmn</span> 设置年轻代大小</li>
    <li><span class="label label-primary">-Xss</span> 设置每个线程的堆栈大小。</li>
    <li><span class="label label-primary">-XX:NewRatio</span> 设置年轻代（包括Eden和两个Survivor区）与年老代的比值（除去持久代）。设置为4，则年轻代与年老代所占比值为1：4，年轻代占整个堆栈的1/5</li>
    <li><span class="label label-primary">-XX:SurvivorRatio</span> 设置年轻代中Eden区与Survivor区的大小比值。设置为4，则两个Survivor区与一个Eden区的比值为2:4，一个Survivor区占整个年轻代的1/6</li>
    <li><span class="label label-primary">-XX:MetaspaceSize</span> 设置元数据大小。</li>
    <li><span class="label label-primary">-XX:MaxMetaspaceSize</span> 设置最大元数据大小</li>
    <li><span class="label label-primary">-XX:TargetSurvivorRatio</span> 在新生代的对象不一定要满足存活年龄达到MaxTenuringThreshold才能去老年代，当Survivor空间中相同年龄所有对象大小总和大于[Desired survivor size]时，年龄大于或等于该年龄的对象直接进入老年代。</li>
    <li><span class="label label-primary">-XX:MaxTenuringThreshold</span> 设置垃圾最大年龄。如果设置为0的话，则年轻代对象不经过Survivor区，直接进入年老代。对于年老代比较多的应用，可以提高效率。如果将此值设置为一个较大值，则年轻代对象会在Survivor区进行多次复制，这样可以增加对象再年轻代的存活时间，增加在年轻代即被回收的概论。</li>
    <li><span class="label label-primary">-XX:SurvivorRatio:</span> 指定NewGeneration中EdenSpace与一个SurvivorSpace的堆size比例,</li>
    <li><span class="label label-primary">XX:SurvivorRatio=8</span> ，那么在总共NewGeneration为10m的情况下，EdenSpace为8m</li>
    <li><span class="label label-primary">-XX:+UseConcMarkSweepGC:</span> 指定在OldGeneration使用CMSGC，GCThread和APPThread并行(在init-mark和remark时PauseAPPThread)。apppause时间较短，适合交互性强的系统。</li>
</ul>

<h3 id="2-2-看看GC次数"><a href="#2-2-看看GC次数" class="headerlink" title="2.2. 看看GC次数"></a>2.2. 看看GC次数</h3><div class="hljs code-wrapper"><pre><code class="hljs Python">[root@localhost <span class="hljs-built_in">bin</span>]<span class="hljs-comment"># jstat -gcutil 4031 1000</span>
 S0     S1     E      O      M     CCS    YGC      YGCT    FGC    FGCT     GCT   
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.20</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.20</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.45</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.45</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.45</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.45</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.45</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.45</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span>
<span class="hljs-number">0.00</span>  <span class="hljs-number">56.81</span>  <span class="hljs-number">72.45</span>   <span class="hljs-number">2.77</span>  <span class="hljs-number">96.20</span>  <span class="hljs-number">94.35</span>     <span class="hljs-number">19</span>    <span class="hljs-number">0.768</span>     <span class="hljs-number">0</span>    <span class="hljs-number">0.000</span>    <span class="hljs-number">0.768</span></code></pre></div>

<ul>
    <li><span class="label label-primary">S0</span> ：幸存1区当前使用比例</li>
    <li><span class="label label-primary">S1</span> ：幸存2区当前使用比例</li>
    <li><span class="label label-primary">E</span> ：伊甸园区使用比例</li>
    <li><span class="label label-primary">O</span> ：老年代使用比例</li>
    <li><span class="label label-primary">M</span> ：元数据区使用比例</li>
    <li><span class="label label-primary">CCS</span> ：压缩使用比例</li>
    <li><span class="label label-primary">YGCT</span> ：年轻代垃圾回收消耗总时间</li>
    <li><span class="label label-primary">FGC</span> ：老年代垃圾回收次数</li>
    <li><span class="label label-primary">FGCT</span> ：老年代垃圾回收消耗时间</li>
    <li><span class="label label-primary">GCT</span> ：垃圾回收消耗总时间</li>
</ul>

<h2 id="3-heap堆的配置"><a href="#3-heap堆的配置" class="headerlink" title="3. heap堆的配置"></a>3. heap堆的配置</h2><div class="hljs code-wrapper"><pre><code class="hljs Python">[root@localhost <span class="hljs-built_in">bin</span>]<span class="hljs-comment"># jmap -heap 4031</span>
Attaching to process ID <span class="hljs-number">4031</span>, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version <span class="hljs-keyword">is</span> <span class="hljs-number">25.231</span>-b11
using parallel threads <span class="hljs-keyword">in</span> the new generation.
using thread-local <span class="hljs-built_in">object</span> allocation.
Concurrent Mark-Sweep GC
Heap Configuration:
   //最小空闲比率
   MinHeapFreeRatio         = <span class="hljs-number">40</span>
   //最大空闲比率
   MaxHeapFreeRatio         = <span class="hljs-number">70</span>
   //堆的最大大小
   MaxHeapSize              = <span class="hljs-number">1073741824</span> (<span class="hljs-number">1024.0</span>MB)
   //新生代的默认大小
   NewSize                  = <span class="hljs-number">536870912</span> (<span class="hljs-number">512.0</span>MB)
   //新生代的最大大小
   MaxNewSize               = <span class="hljs-number">536870912</span> (<span class="hljs-number">512.0</span>MB)
   //老年代的默认大小
   OldSize                  = <span class="hljs-number">536870912</span> (<span class="hljs-number">512.0</span>MB)
   NewRatio                 = <span class="hljs-number">4</span>
   SurvivorRatio            = <span class="hljs-number">4</span>
   //元空间的默认大小
   MetaspaceSize            = <span class="hljs-number">268435456</span> (<span class="hljs-number">256.0</span>MB)
   //类指针压缩空间的默认大小
   CompressedClassSpaceSize = <span class="hljs-number">260046848</span> (<span class="hljs-number">248.0</span>MB)
   //元空间的最大大小
   MaxMetaspaceSize         = <span class="hljs-number">268435456</span> (<span class="hljs-number">256.0</span>MB)
   //使用G1垃圾收集器的时候
   G1HeapRegionSize         = <span class="hljs-number">0</span> (<span class="hljs-number">0.0</span>MB)
Heap Usage:
New Generation (Eden + <span class="hljs-number">1</span> Survivor Space):
   capacity = <span class="hljs-number">447414272</span> (<span class="hljs-number">426.6875</span>MB)
   used     = <span class="hljs-number">317350352</span> (<span class="hljs-number">302.6488800048828</span>MB)
   free     = <span class="hljs-number">130063920</span> (<span class="hljs-number">124.03861999511719</span>MB)
   <span class="hljs-number">70.9298678786894</span>% used
Eden Space: //Eden区域分配情况
   capacity = <span class="hljs-number">357957632</span> (<span class="hljs-number">341.375</span>MB)
   used     = <span class="hljs-number">266528528</span> (<span class="hljs-number">254.18141174316406</span>MB)
   free     = <span class="hljs-number">91429104</span> (<span class="hljs-number">87.19358825683594</span>MB)
   <span class="hljs-number">74.45812134548929</span>% used
From Space: //其中一个Survivor区域分配情况
   capacity = <span class="hljs-number">89456640</span> (<span class="hljs-number">85.3125</span>MB)
   used     = <span class="hljs-number">50821824</span> (<span class="hljs-number">48.46746826171875</span>MB)
   free     = <span class="hljs-number">38634816</span> (<span class="hljs-number">36.84503173828125</span>MB)
   <span class="hljs-number">56.81168440934066</span>% used
To Space: //另一个Survivor区域分配情况
   capacity = <span class="hljs-number">89456640</span> (<span class="hljs-number">85.3125</span>MB)
   used     = <span class="hljs-number">0</span> (<span class="hljs-number">0.0</span>MB)
   free     = <span class="hljs-number">89456640</span> (<span class="hljs-number">85.3125</span>MB)
   <span class="hljs-number">0.0</span>% used
concurrent mark-sweep generation:
   capacity = <span class="hljs-number">536870912</span> (<span class="hljs-number">512.0</span>MB)
   used     = <span class="hljs-number">14854688</span> (<span class="hljs-number">14.166534423828125</span>MB)
   free     = <span class="hljs-number">522016224</span> (<span class="hljs-number">497.8334655761719</span>MB)
   <span class="hljs-number">2.7669012546539307</span>% used
<span class="hljs-number">36932</span> interned Strings occupying <span class="hljs-number">4449232</span> <span class="hljs-built_in">bytes</span>.</code></pre></div>




            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/Java/">Java</a>
                    
                      <a class="hover-with-bg" href="/tags/Jvm/">Jvm</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2021/06/04/java/synchronized1.0/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">深入理解 synchronized 原理</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2021/06/04/java/HashMap/">
                        <span class="hidden-mobile">Java HashMap原理以及常见的面试题</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
              <!-- Comments -->
              <article class="comments" id="comments" lazyload>
                
                  
                
                
  <div id="valine"></div>
  <script type="text/javascript">
    Fluid.utils.loadComments('#valine', function() {
      Fluid.utils.createScript('https://cdn.jsdelivr.net/gh/HCLonely/Valine@latest/dist/Valine.min.js', function() {
        var options = Object.assign(
          {"appId":"BmWJPSifebgqliaA9sdhmII7-gzGzoHsz","appKey":"HvFu44h5vVRRYuQIg6uNJkKR","placeholder":"说点什么","path":"window.location.pathname","avatar":"retro","meta":["nick","mail","link"],"pageSize":10,"lang":"zh-CN","highlight":true,"recordIP":false,"serverURLs":"https://bmwjpsif.lc-cn-n1-shared.com","emojiCDN":null,"emojiMaps":null,"enableQQ":false,"requiredFields":[]},
          {
            el: "#valine",
            path: window.location.pathname,
            master: "",
            friends: "",
            tagMeta: ["博主","友人","访客"]
          }
        )
        new Valine(options);
      });
    });
  </script>
  <noscript>Please enable JavaScript to view the comments</noscript>


              </article>
            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  

  

  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/img-lazyload.js" ></script>
  



  



  <script  src="https://cdn.jsdelivr.net/npm/tocbot@4.12.3/dist/tocbot.min.js" ></script>



  <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js" ></script>



  <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4.3.1/anchor.min.js" ></script>



  <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js" ></script>



  <script  src="/js/local-search.js" ></script>






  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2.0.12/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>














  
<script src="/js/diy/timeDate.js"></script>



<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>


</body>
</html>
